<h1>Listing items</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Number</th>
    <th>Year of Purchase</th>
    <th>Category</th>
    <th>Notes</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @items.each do |item| %>
  <tr>
    <td><%= item.title %></td>
    <td><%= item.number %></td>
    <td><%= item.yearOfPurchase %></td>
    <td><%= item.category.name %></td>
    <td><%= item.notes %></td>
    <td><%= link_to 'Show', item %></td>
    <td><%= link_to 'Edit', edit_item_path(item) %></td>
    <td><%= link_to 'Destroy', item, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Item', new_item_path %>
